class CreateGroups < ActiveRecord::Migration
  def self.up
    create_table :groups do |t|
      t.column "name", :string
      t.column "description", :text
      t.column "created_at", :datetime
      t.column "user_id", :integer
      t.column "category_id", :integer
    end

    foreign_key :groups, :user_id, :users

  end

  def self.down
    drop_table :groups
  end
end
